#!/bin/sh
#
# $OpenBSD: prosody.rc,v 1.3 2012/08/04 15:28:14 ajacoutot Exp $

daemon="${TRUEPREFIX}/sbin/prosodyctl"
daemon_flags="start"
daemon_user="_prosody"

. /etc/rc.d/rc.subr

rc_reload=NO
rc_usercheck=NO

rc_check() {
	# return 1 is needed: prosodyctl returns a higher error code on failure
	${TRUEPREFIX}/sbin/prosodyctl status || return 1
}

rc_stop() {
	${TRUEPREFIX}/sbin/prosodyctl stop
}

rc_cmd $1
